<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">

    <input v-model="username">
    {{username}}

</div>

<script src="js/vue.js"></script>

<script>
    // 1. 创建vue核心
    new Vue({
        el:"#app",
        data(){
            return{
                username:""
            }
        }

        // data:function () {
        //     return{
        //         username:""
        //     }
        // }

    });
</script>
</body>
</html>